package com.web.controller;

import com.web.service.impl.DemoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@PropertySource(value="classpath:application.properties",encoding = "UTF-8")
public class DemoRestController {

    @Autowired
    private DemoServiceImpl demoService;

    @RequestMapping("/getJson")
    public String show() {
        return "返回json数据";
    }
    @RequestMapping("/test")
    public String testValue() {
        demoService.outPut();
        return "测试连接";
    }
}
